import request from '@/utils/request'

// 获取未读/已读信息列表
export function getMessageList(query) {
  return request({
    url: '/archive/yqXxtz/list',
    method: 'get',
    params: query
  })
}
// 查询是否有未读消息
export function getMessageUnread() {
  return request({
    url: '/archive/yqXxtz/unread/messages',
    method: 'post'
  })
}

// 设置已读
export function setRead(id) {
  return request({
    url: '/archive/yqXxtz/' + id,
    method: 'put',
  })
}

// 设置全部已读
export function setAllRead() {
  return request({
    url: '/archive/yqXxtz/allRead',
    method: 'put',
  })
}

// 设置删除
export function deleteMsg(id) {
  return request({
    url: '/archive/yqXxtz/' + id,
    method: 'delete'
  })
}

// 设置全部删除
export function deleteAllMsg() {
  return request({
    url: '/archive/yqXxtz/allRemove',
    method: 'delete'
  })
}

// 获取待办
export function updateApproveNoticeData() {
  return request({
    url: '/archive/yqXxtz/updateApproveNoticeData',
    method: 'get'
  })
}

